package org.act.xservices.rt.xcontainer.framework.lifecycle;

import java.util.EventObject;

/**
 * 
 * @version 1.0 2005-6-23
 * @author liujian [liujian@act.buaa.edu.cn]
 * @since JDK1.5
 */
public final class LifecycleEvent extends EventObject {

	/**
	 * 
	 */
	private static final long serialVersionUID = -909034850947523931L;
	/**
	 */
	private int type;
	/**
	 */
	private Object data;

	public LifecycleEvent(ILifecycle lifecycle, int type) {
		this(lifecycle, type, null);
	}
	
	public LifecycleEvent(ILifecycle lifecycle, int type, Object data) {
		super(lifecycle);
		this.type = type;
		this.data = data;
	}

	/**
	 * @return   Returns the data.
	 */
	public Object getData() {
		return data;
	}

	/**
	 * @param data   The data to set.
	 */
	public void setData(Object data) {
		this.data = data;
	}

	/**
	 * @return   Returns the type.
	 */
	public int getType() {
		return type;
	}

	/**
	 * @param type   The type to set.
	 */
	public void setType(int type) {
		this.type = type;
	}
	
}
